package com.elysia.visionmanagerspringboot.controller;

import com.elysia.visionmanagerspringboot.domain.dto.StudioContactDTO;
import com.elysia.visionmanagerspringboot.result.Result;
import com.elysia.visionmanagerspringboot.service.impl.IStudioContactServiceImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/studio_contact")
@RequiredArgsConstructor
@Slf4j
public class StudioContactController {
    private final IStudioContactServiceImpl studioContactService;
    @PutMapping
    public Result<Object> update(@RequestBody StudioContactDTO studioContactDTO){
        log.info("修改联系方式{}", studioContactDTO);
        return studioContactService.update(studioContactDTO);
    }
    @GetMapping
    public Result<Object> get(){
        log.info("获取联系方式");
        return studioContactService.get();
    }
}
